#! /bin/bash

file=demo2
lines=`wc -l $file | awk '{print $1}'`
for(( i = 1; i <= $lines ; i++))
do
  #echo -n "${i} "
  #echo -n `awk NR==${i}'{print $0}' $file` " "
  size=`awk NR==${i}'{print $0}' $file |grep -o , |wc -l`
  if [ $size != 23 ] && [ $size != 24 ]
  then
    echo -n "${i} "
    echo -n `awk NR==${i}'{print $0}' $file` " "
    echo $size
  fi
done

#格式化处理下载的结果集合

#  awk '{if($0 ~ /\$/) ORS="\n"; else ORS=" "}1' Iowa_Liquor_Sales.csv > iwoa.csv
#  sed -i '1d' iwoa.csv #删除头